<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use \dmstr\bootstrap\Tabs;
use yii\helpers\StringHelper;

/**
 * @var yii\web\View $this
 * @var common\models\Goods $model
 * @var yii\widgets\ActiveForm $form
 */

?>

<div class="goods-form">



    <div class="">
        <?php $this->beginBlock('main'); ?>
        <?php $form = ActiveForm::begin([
                'id' => 'Goods',
                'layout' => 'horizontal',
                'enableClientValidation' => true,
                'errorSummaryCssClass' => 'error-summary alert alert-danger',
                'fieldConfig' => [
                    'template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}",
                    'horizontalCssClasses' => [
                        'label' => 'col-sm-2',
                        #'offset' => 'col-sm-offset-4',
                        'wrapper' => 'col-sm-8',
                        'error' => '',
                        'hint' => '',
                    ],
                ],
            ]
        );
        ?>
        <p>


            <!-- attribute goods_name -->
            <?= $form->field($model, 'goods_name')->textInput(['maxlength' => true]) ?>

            <!-- attribute gc_id -->
            <?= $form->field($model, 'gc_id')->textInput() ?>

            <!-- attribute gc_name -->
            <?= $form->field($model, 'gc_name')->textInput(['maxlength' => true]) ?>

            <!-- attribute spec_id -->
            <?= $form->field($model, 'spec_id')->textInput() ?>

            <!-- attribute goods_image -->
            <?= $form->field($model, 'goods_image')->textInput(['maxlength' => true]) ?>

            <!-- attribute goods_store_price -->
            <?= $form->field($model, 'goods_store_price')->textInput(['maxlength' => true]) ?>

            <!-- attribute goods_show -->
            <?= $form->field($model, 'goods_show')->textInput() ?>

            <!-- attribute goods_commend -->
            <?= $form->field($model, 'goods_commend')->textInput() ?>

            <!-- attribute goods_body -->
            <?= $form->field($model, 'goods_body')->textarea(['rows' => 6]) ?>

            <!-- attribute brand_id -->
            <?= $form->field($model, 'brand_id')->textInput() ?>

            <!-- attribute type_id -->
            <?= $form->field($model, 'type_id')->textInput() ?>

            <!-- attribute spec_open -->
            <?= $form->field($model, 'spec_open')->textInput() ?>

            <!-- attribute goods_click -->
            <?= $form->field($model, 'goods_click')->textInput() ?>

            <!-- attribute goods_state -->
            <?= $form->field($model, 'goods_state')->textInput() ?>

            <!-- attribute goods_add_time -->
            <?= $form->field($model, 'goods_add_time')->textInput() ?>

            <!-- attribute goods_starttime -->
            <?= $form->field($model, 'goods_starttime')->textInput() ?>

            <!-- attribute goods_endtime -->
            <?= $form->field($model, 'goods_endtime')->textInput() ?>

            <!-- attribute goods_form -->
            <?= $form->field($model, 'goods_form')->textInput() ?>

            <!-- attribute transport_id -->
            <?= $form->field($model, 'transport_id')->textInput() ?>

            <!-- attribute commentnum -->
            <?= $form->field($model, 'commentnum')->textInput() ?>

            <!-- attribute salenum -->
            <?= $form->field($model, 'salenum')->textInput() ?>

            <!-- attribute goods_collect -->
            <?= $form->field($model, 'goods_collect')->textInput() ?>

            <!-- attribute goods_transfee_charge -->
            <?= $form->field($model, 'goods_transfee_charge')->textInput() ?>

            <!-- attribute goods_image_more -->
            <?= $form->field($model, 'goods_image_more')->textarea(['rows' => 6]) ?>

            <!-- attribute goods_attr -->
            <?= $form->field($model, 'goods_attr')->textarea(['rows' => 6]) ?>

            <!-- attribute goods_spec -->
            <?= $form->field($model, 'goods_spec')->textarea(['rows' => 6]) ?>

            <!-- attribute goods_col_img -->
            <?= $form->field($model, 'goods_col_img')->textarea(['rows' => 6]) ?>

            <!-- attribute spec_name -->
            <?= $form->field($model, 'spec_name')->textInput(['maxlength' => true]) ?>

            <!-- attribute goods_keywords -->
            <?= $form->field($model, 'goods_keywords')->textInput(['maxlength' => true]) ?>

            <!-- attribute goods_description -->
            <?= $form->field($model, 'goods_description')->textInput(['maxlength' => true]) ?>

            <!-- attribute goods_close_reason -->
            <?= $form->field($model, 'goods_close_reason')->textInput(['maxlength' => true]) ?>

            <!-- attribute goods_store_price_interval -->
            <?= $form->field($model, 'goods_store_price_interval')->textInput(['maxlength' => true]) ?>

            <!-- attribute goods_serial -->
            <?= $form->field($model, 'goods_serial')->textInput(['maxlength' => true]) ?>
        </p>

        <?= Html::submitButton(
            '<span class="glyphicon glyphicon-check"></span> ' .
            ($model->isNewRecord ? 'Create' : 'Save'),
            [
                'id' => 'save-' . $model->formName(),
                'class' => 'btn btn-success'
            ]
        );
        ?>

        <?php ActiveForm::end(); ?>
        <?php $this->endBlock(); ?>

        <?php $this->beginBlock('logs'); ?>
yyyy
        <?php $this->endBlock(); ?>
        <?=
        Tabs::widget(
            [
                'encodeLabels' => false,
                'items' => [
                    [
                        'label' => Yii::t('common', 'Goods'),
                        'content' => $this->blocks['main'],
                        'active' => true,
                    ],
                    [
                        'label' => Yii::t('common', 'Goods logs'),
                        'content' => $this->blocks['logs'],
                        'active' => false,
                    ],
                ]
            ]
        );
        ?>
        <hr/>

        <?php echo $form->errorSummary($model); ?>



    </div>

</div>

